package com.accp.vehiclecare.dao.hzdao;

import com.accp.vehiclecare.vo.hzvo.Vehiclebrand;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Service;

import java.util.List;

public interface VehiclebrandMapper {
    int deleteByPrimaryKey(Integer vbrandid);

    int insert(Vehiclebrand record);

    int insertSelective(Vehiclebrand record);

    Vehiclebrand selectByPrimaryKey(Integer vbrandid);

    int updateByPrimaryKeySelective(Vehiclebrand record);

    int updateByPrimaryKey(Vehiclebrand record);

    List<Vehiclebrand> showlist(@Param("no")String no,@Param("name")String name );

    @Insert("INSERT INTO `vehiclebrand` (`vbrandno`,`vbrandname`)" +
            "VALUES(#{vehiclebrand.vbrandno},#{vehiclebrand.vbrandname})")
    int addpp(@Param("vehiclebrand")Vehiclebrand vehiclebrand);

    @Select("SELECT * FROM `vehiclebrand` WHERE `vbrandid` =#{id}")
    Vehiclebrand showone(@Param("id")Integer id);

    @Delete("DELETE FROM `vehiclebrand` WHERE `vbrandid`=#{id}")
    int removepp(@Param("id")Integer id);

    @Update("UPDATE `vehiclebrand` SET `vbrandno`=#{vehiclebrand.vbrandno},`vbrandname`=#{vehiclebrand.vbrandname} WHERE `vbrandid`=#{id}")
    int update(@Param("vehiclebrand")Vehiclebrand vehiclebrand,@Param("id")Integer id);

}